package org.xiaojl.common;

import org.xiaojl.config.PropertiesUtil;
import org.xiaojl.utils.ToolUtil;

public class Constants {
	/**
     * 用户登录Session
     */
    public static final String SESSION_USER = "SESSION-USER";
    /**
     * 是否开启登录验证码功能：true 开启，false 关闭
     */
    public static boolean CAPTCHA_OPEN = false;
    /** 
     * 保存文件的目录，放在web目录、或一个指定的绝对目录下 
     */  
    public static final String UPLOAD_PATH = PropertiesUtil.getProperty("uploadFilePath", "upload");
    /** 
     * 图片文件保存的路径，放在web目录
     */  
    public static final String IMG_SAVE_PATH = PropertiesUtil.getProperty("img.file.save.path", "upload");
     
    
    /** 动态定时任务状态参数  Begin */
 	public static final String JOB_STATUS_RUNNING = "1";// 启动任务
 	public static final String JOB_STATUS_NOT_RUNNING = "0";// 不启动任务
 	public static final String JOB_CONCURRENT_IS = "1";// 有状态
 	public static final String JOB_CONCURRENT_NOT = "0";// 无状态
 	/** 动态定时任务状态参数  End */
 	
 	static{
 		if(ToolUtil.isNotEmpty(PropertiesUtil.getProperty("CAPTCHA_OPEN"))){
 			CAPTCHA_OPEN = Boolean.valueOf(PropertiesUtil.getProperty("CAPTCHA_OPEN"));
 		}
 		
 	}
}
